<template>

<div class="index-content">
  <headers :heatle="title"></headers>
  <input type="text" class="input" placeholder="搜索作者或书名" @click="inputclick()">
  <nav-list style="flex:1;-webkit-flex:1;"></nav-list>
<footers></footers>

</div>
</template>

<script>
  import wx from 'weixin-js-sdk'
  import navList from '@/components/navList'
  import footers from '@/components/footers'
  import headers from '@/components/headers'
    export default {
        name: "index",
      data () {
        return {
          title:'首页',
          // bannerList:[],//轮播图数据
          dataList:[],//全部页面数据
        }
      },
      components: {
        navList,
        footers,
        headers
      },
      mounted(){
          console.log(wx)
        var jumpUrl = 'https://open.weixin.qq.com/connect/oauth2/authorize?';
   /*     var appId = 'wxed7380181619ea73';
        var redirectUrl = "http://wx.readerday.com/index.html";
        var params = {
          appid: appId,
          redirect_uri: redirectUrl,
          response_type: 'code',
          scope: 'snsapi_userinfo',
          state: 'xyz',
        };*/
        jumpUrl += 'appid=wxed7380181619ea73&redirect_uri=http://wx.readerday.com/index.html&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect'
        location.href = jumpUrl;


      },

      methods:{
        inputclick(){
         this.$router.push({name:'search'})
        }
      }
    }
</script>

<style scoped>
.input{
  width: 90%;
  border: 1px solid #ccc;
  background: #eee;
  height: .30rem;
  margin: .1rem auto;
  border-radius: .08rem;
  padding-left: .08rem;
}
.index-content{
  height:100%;
  display: flex;
  display: -webkit-flex;
  flex-direction: column;
  -webkit-flex-direction:column;
}

</style>
